#include <stdio.h>
#include "arbre.h"

int main(int argc, char **argv)
{
  Arbre A;
  Arbre B;
  
  initialiserArbre(&A);
  A.adRacine = (Noeud *) malloc(1 * sizeof(Noeud));
  A.adRacine->info = 10;
  
  A.adRacine->fg = (Noeud *) malloc(1 * sizeof(Noeud));
  A.adRacine->fg->info = 6;

  A.adRacine->fd = (Noeud *) malloc(1 * sizeof(Noeud));
  A.adRacine->fd->info = 11;

  A.adRacine->fg->fd = (Noeud *) malloc(1 * sizeof(Noeud));
  A.adRacine->fg->fd->info = 8;
  A.adRacine->fg->fg = NULL;
  A.adRacine->fg->fd->fg = NULL;
  A.adRacine->fg->fd->fd = NULL;
  A.adRacine->fd->fd = NULL;
  A.adRacine->fd->fg = NULL;
  printf("\t\t\t10\n");
  printf("\t6\t\t\t\t11\n");
  printf("\t\t8\n");
  printf("\t\tAffichage Infixe de A\n");
  affichageInfixeArbre(A);
  printf("\n\n\t\tAffichage Prefixe de A\n");
  affichagePrefixeArbre(A);
  printf("\n\n\t\tAffichage Postfixe de A\n");
  affichagePostfixeArbre(A);
  printf("\n\n");
  printf("\t\tCopie de A dans B\n");
  initialiserArbre(&B);
  copier(&B, A);

  printf("\t\tAffichage Infixe de B\n");
  affichageInfixeArbre(B);
  printf("\n\n\t\tAffichage Prefixe de B\n");
  affichagePrefixeArbre(B);
  printf("\n\n\t\tAffichage Postfixe de B\n");
  affichagePostfixeArbre(B);

  testamentArbre(&A);
  testamentArbre(&B);
  return 0;
  (void) argc;
  (void) argv;
}
